package com.usian.service;

import com.github.pagehelper.PageInfo;
import com.usian.common.dto.CourseDTO;
import com.usian.common.model.course.CourseComment;
import com.usian.common.untils.Result;
import com.usian.common.vo.CourseVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @projectName: 2210A-project1
 * @package: com.usian.service
 * @className: CourseFeignService
 * @author: 莫洪维
 * @email: 1204315800@qq.com
 * @description: TODO
 * @date: 2023/8/23 19:02
 */
@FeignClient("day09Course")
public interface CourseFeignService {

    /**
     * 添加评论方法
     * @param courseComment
     * @return
     */
    @RequestMapping(value = "/comment/saveComment",method = RequestMethod.POST)
    public Result saveComment(CourseComment courseComment);

    /**
     * 查询所有评论信息方法
     * @return
     */
    @RequestMapping(value = "/comment/findAll",method = RequestMethod.GET)
    public Result findAllComment(@SpringQueryMap CourseComment courseComment);

    //查询所有课程方法
    @RequestMapping(value = "/course/list",method = RequestMethod.GET)
    public PageInfo<CourseVO> list(@SpringQueryMap CourseDTO courseDTO);
}
